package pattern.strategy

import pattern.strategy.behavior.fly.{FlyWithWings, FlyBehavior}
import pattern.strategy.behavior.quack.{Quack, QuackBehavior}

/**
 * Created by root on 15-9-17.
 */
class MallardDuck() extends Duck{
  //这里就用到了策略模式
  override protected val quackBehavior: QuackBehavior = new Quack
  override protected val flyBehavior: FlyBehavior = new FlyWithWings
}
